<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:sinox="http://www.sinosoft.com.cn/sinox"
	xmlns:p="http://primefaces.org/ui"
	template="/layout/page/form/page-fieldset-template.xhtml">

	<ui:param name="pvb" value="#{commonContentViewBean.parent}" />
	<ui:param name="pageViewBean" value="#{commonContentViewBean}" />
	<ui:param name="compId" value="#{pageViewBean.id}" />
	<ui:param name="compTitle" value="组织机构信息" />


	<ui:define name="compContent">
		<ui:decorate template="/layout/input/editable-template.xhtml">
		    <ui:param name="compColumnNum" value="1" />
		    <ui:param name="compLabelStyle" value="width:15%;"/>
		    <ui:param name="compContentStyle" value="width:35%;"/>
		    
			<!-- 第一行 -->
			<ui:decorate template="/layout/input/editable-1c-custom-template.xhtml">
				<ui:param name="compBeanId" value="orgFullName" />
				<ui:param name="compBeanLable" value="组织机构完整名称：" />
				<ui:param name="compBeanRequired" value="true" />
				
				<ui:define name="compBeanContent"> 
					<sinox:inputText id="orgFullName" value="#{pageViewBean.fields.fullName}" styleClass="{required:true,maxlength:200}"/>
				</ui:define>
			</ui:decorate>
			
			<!-- 第二行 -->
			<ui:decorate template="/layout/input/editable-1c-custom-template.xhtml">
				<ui:param name="compBeanId" value="orgName" />
				<ui:param name="compBeanLable" value="组织机构常用名称：" />
				<ui:param name="compBeanRequired" value="true" />
				
				<ui:define name="compBeanContent"> 
					<sinox:inputText id="orgName" value="#{pageViewBean.fields.name}" styleClass="{required:true,maxlength:100}"/>
				</ui:define>
			</ui:decorate>
			
			<!-- 第三行 -->
			<ui:decorate template="/layout/input/editable-1c-custom-template.xhtml">
				<ui:param name="compBeanId" value="shortName" />
				<ui:param name="compBeanLable" value="组织机构简称：" />
				<ui:param name="compBeanRequired" value="true" />
				
				<ui:define name="compBeanContent"> 
					<sinox:inputText id="shortName" value="#{pageViewBean.fields.shortName}" styleClass="{required:true,maxlength:50}"/>
				</ui:define>
			</ui:decorate>
			
			<!-- 第四行 -->
			<ui:decorate template="/layout/input/editable-1c-custom-template.xhtml">
				<ui:param name="compBeanId" value="orgCode" />
				<ui:param name="compBeanLable" value="组织机构编码：" />
				<ui:param name="compBeanRequired" value="true" />
				
				<ui:define name="compBeanContent"> 
					<sinox:inputText id="orgCode" value="#{pageViewBean.fields.code}" styleClass="{required:true,maxlength:12}"/>
				</ui:define>
			</ui:decorate>
			
			<!-- 第五行 -->
			<ui:decorate template="/layout/input/editable-1c-custom-template.xhtml">
				<ui:param name="compBeanId" value="officeTel" />
				<ui:param name="compBeanLable" value="办公电话：" />
				
				<ui:define name="compBeanContent"> 
					<sinox:inputText id="officeTel" value="#{pageViewBean.fields.officeTel}" styleClass="{maxlength:30}"/>
				</ui:define>
			</ui:decorate>
			
			<!-- 第六行 -->
			<ui:decorate template="/layout/input/editable-1c-custom-template.xhtml">
				<ui:param name="compBeanId" value="officeFax" />
				<ui:param name="compBeanLable" value="传真：" />
				
				<ui:define name="compBeanContent"> 
					<sinox:inputText id="officeFax" value="#{pageViewBean.fields.officeFax}" styleClass="{maxlength:30}"/>
				</ui:define>
			</ui:decorate>
			
			<!-- 第七行 -->
			<ui:decorate template="/layout/input/editable-1c-custom-template.xhtml">
				<ui:param name="compBeanId" value="address" />
				<ui:param name="compBeanLable" value="地址：" />
				
				<ui:define name="compBeanContent"> 
					<sinox:inputText id="address" value="#{pageViewBean.fields.address}"  styleClass="{maxlength:60}"/>
				</ui:define>
			</ui:decorate>
			
			<!-- 第八行 -->
			<ui:decorate template="/layout/input/editable-1c-custom-template.xhtml">
				<ui:param name="compBeanId" value="postCode" />
				<ui:param name="compBeanLable" value="邮编：" />
				
				<ui:define name="compBeanContent"> 
					<sinox:inputText id="postCode" value="#{pageViewBean.fields.postCode}"  styleClass="{digits:true,maxlength:6}"/>
				</ui:define>
			</ui:decorate>
			
		</ui:decorate>

	</ui:define>
	

	<ui:define name="compButtons">
		<p:commandButton
			actionListener="#{orgAction.addOrEditOrg}" title="保存"
			onstart="return SinoPortal.Validation.validateForm('#{compId}_form')"
			oncomplete="#{commonContentViewBean.id}_dialog.hide();"
			image="./img/icons/add.png" value="保存" style="margin:5px;"
			update="#{pvb.id}_left_form:#{pvb.id}_tree,#{pvb.id}_right_form">
			<h:inputHidden value="#{pageViewBean.id}" />
		</p:commandButton>
		
		<p:commandButton title="关闭" type="button"
			onclick="#{commonContentViewBean.id}_dialog.hide();"
			image="./img/icons/cancel.png" value="关闭" style="margin:5px;">
		</p:commandButton>
	</ui:define>

</ui:composition>